﻿@model IEnumerable<ADShop.Models.PromotionsProduct>

@{
    ViewBag.Title = "Index";
}

<h2>Index PromotionsProduct</h2>

<p>
    @Html.ActionLink("Create New", "Create", null, new { @class = "btn btn-green" })
</p>

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="fa fa-external-link-square"></i>
       Khuyến Mãi
        <div class="panel-tools">
            <a class="btn btn-xs btn-link panel-collapse collapses" href="#">
            </a>
            <a class="btn btn-xs btn-link panel-config" href="#panel-config" data-toggle="modal">
                <i class="fa fa-wrench"></i>
            </a>
            <a class="btn btn-xs btn-link panel-refresh" href="#">
                <i class="fa fa-refresh"></i>
            </a>
            <a class="btn btn-xs btn-link panel-expand" href="#">
                <i class="fa fa-resize-full"></i>
            </a>
            <a class="btn btn-xs btn-link panel-close" href="#">
                <i class="fa fa-times"></i>
            </a>
        </div>
    </div>
    <div class="panel-body">
        <table class="table table-hover" id="sample-table-1">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.IDPromotions)
                    </th>
                    <th>
                        Product
                    </th>
                    
                    <th>
                        @Html.DisplayNameFor(model => model.FromDay)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.ToDay)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Quantity)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Active)
                    </th>
                    <th>Chức Năng</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var items in Model)
                {
                    <tr>
                        <td>@items.IDPromotions</td>
                     
                        <td>@Html.Action("GetImages", new { id = @items.IDProduct })</td>
                        <td>@items.FromDay</td>
                        <td>
                            @items.ToDay
                        </td>
                        <td>@items.Quantity</td>
                        <td>@items.Active</td>
                        <td>
                            @Html.ActionLink("Sửa", "Edit", new { id = @items.IDPromotions }, new { @class = "label label-warning" })
                            @Html.ActionLink("Xem", "Details", new { id = @items.IDPromotions }, new { @class = "label label-warning" })
                            @Html.ActionLink("Xóa", "DeleteConfirmed", new { id = @items.IDPromotions}, new { @class = "label label-danger", onclick = "return confirm('Are you sure to delete this item?')" })
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>

